#pragma once

#include "display.h"
#include "xdg-shell.h"

#include <cstdint>

namespace ukuiwaylandclient
{

class display;
class wl_surface_t;
class xdg_surface_t;
class xdg_toplevel_t;
class wl_buffer_t;

class window
{
public:
    window(display *disp, int width = 800, int height = 600);
    ~window();

    void show();
    void hide();
    void resize(int32_t width, int32_t height);

private:
    display *m_display = nullptr;
    wl_surface_t *m_wl_surface = nullptr;
    xdg_surface_t *m_xdg_surface = nullptr;
    xdg_toplevel_t *m_xdg_toplevel = nullptr;

    wl_buffer_t *m_buffer = nullptr;
    void *m_data = nullptr;

    int32_t m_width;
    int32_t m_height;
};

}